import { createApp } from 'vue'
import App from './App.vue'
import { ImgUtil } from './utils/imgUtil'
import router from './router/index'
import './style.scss'
import 'vant/lib/index.css'
import 'vue3-easy-data-table/dist/style.css'
import 'virtual:svg-icons-register'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.min.mjs'

import errImg from '@/assets/image/image/error-img.png'
import EasyDataTable from 'vue3-easy-data-table'
import {
  Tab,
  Tabs,
  PullRefresh,
  BackTop,
  Button,
  Popup,
  Form,
  Field,
  CellGroup,
  DatePicker,
  Picker,
  Notify,
  Image as VanImage,
  Lazyload,
  ConfigProvider
} from 'vant'
import { createPinia } from 'pinia'
import mLibs from './components/index'
ImgUtil.storageImgList()
const app = createApp(App)
  .use(ElementPlus, {
    locale: zhCn
  })
  .use(router)
  .use(createPinia())
  .use(mLibs)
  .use(Popup)
  .use(Tab)
  .use(ConfigProvider)
  .use(Tabs)
  .use(BackTop)
  .use(PullRefresh)
  .use(Form)
  .use(Field)
  .use(Notify)
  .use(CellGroup)
  .use(Button)
  .use(DatePicker)
  .use(Picker)
  .component('EasyDataTable', EasyDataTable)
  .use(VanImage)
  .use(Lazyload, {
    lazyComponent: true,
    error: errImg
  })
  .mount('#app')
